import org.commonmark.html.HtmlRenderer;
import org.commonmark.node.Node;
import org.commonmark.parser.Parser;
import org.junit.Test;

import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketAddress;


/**
 * @author bjliuyong
 * @version 1.0
 * @created date 16-1-7
 */
public class MarkDown {

    @Test
    public void testMarkDown() throws Exception{

        Socket socket = new Socket();

        SocketAddress socketAddress = new InetSocketAddress("10.1.66.98",9000);
        socket.bind(socketAddress);

        Parser parser = Parser.builder().build();
        Node document = parser.parse("This is *Sparta*");
        HtmlRenderer renderer = HtmlRenderer.builder().build();
        System.out.println(renderer.render(document));// "<p>This is <em>Sparta</em></p>\n"
    }
}
